<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<f:view contentType="text/html">
	<h:head>
		<meta http-equiv="content-Type" content="text/html;charset=UTF-8" />
		<title><ui:insert name="title" /></title>
		<link rel="shortcut icon" href="../resources/images/favicon.png"
			type="image/x-icon" />
		<link rel="icon" href="../resources/images/favicon.png"
			type="image/x-icon" />

		<link rel="stylesheet" href="../resources/css/baseFO.css"
			type="text/css" />
	</h:head>

	<h:body>
		<p:panel id="page" styleClass="page">
			<h:form id="panelConnexion">
                <p:panel styleClass="header_deconnexion"
                    rendered="#{mbAccueil.clientConnected != null}">
                    <p:commandButton styleClass="topmenu_button" value="Déconnexion"
                        action="#{mbAccueil.deconnexion }" update=":panelConnexion" />
                    <p:commandButton styleClass="topmenu_button" value="Mon Compte" action="#{mbAccueil.gestionCompte}" />
                    <p:commandButton styleClass="topmenu_button" action="#{mbAccueil.gestionCommandes }" value="Mes commandes"  />
                    <h:outputText value="Bienvenue #{mbAccueil.clientConnected.prenom} #{mbAccueil.clientConnected.nom}" styleClass="lblBienvenue" />
                </p:panel>
                <p:panel styleClass="header_connexion"
                    rendered="#{mbAccueil.clientConnected == null}">
                    <p:commandButton styleClass="topmenu_button" value="Inscription"
                        action="#{mbAccueil.creerCompte}" />
                    <p:commandButton styleClass="topmenu_button" value="Connexion"
                        action="#{mbAccueil.connexion }"
                        update=":panelConnexion,:general_growl_form:general_growl" />
                    <p:password styleClass="textFieldConnexion" id="mdp_inputText"
                        value="#{mbAccueil.connexionMdp }" />
                    <h:outputLabel value="Mot de passe" styleClass="labelConnexion" />
                    <p:inputText id="identifiant_inputText"
                        value="#{mbAccueil.connexionMail }" styleClass="textFieldConnexion" />
                    <h:outputLabel value="Identifiant" styleClass="labelConnexion" />
                </p:panel>
            </h:form>

			<h:panelGrid style="width:101%;" columns="3" columnClasses="twenty, sixty, twenty">
				<h:column id="colonne_gauche_header" styleClass="header">
					<h:panelGrid columns="1">
						<a href="../pagesFrontOffice/accueil.xhtml" title="Vin sur Vin" class="logo-one"> <img
							src="../resources/images/logo.png" alt="Vin sur Vin"
							height="115px" />
						</a>
					</h:panelGrid>
				</h:column>

				<h:column>
					<fieldset>
						<legend>Recherche</legend>
						<h:form>
							<h:panelGrid columns="8">
								<p:panelGrid columns="2">
									<h:outputLabel value="Nom:"
										style="font-weight:bold;float:left;" />
									<p:inputText value="#{mbAccueil.rechercheTextuelle }" />
								</p:panelGrid>

								<p:panelGrid columns="6">
									<h:outputLabel style="font-weight:bold;float:left;"
										value="Gamme de prix:" />
									<h:outputLabel value="entre:" />
									<p:inputText value="#{mbAccueil.recherchePrixMin}"
										styleClass="recherchePrixInput" />
									<h:outputLabel value="euros et" />
									<p:inputText value="#{mbAccueil.recherchePrixMax}"
										styleClass="recherchePrixInput" />
									<h:outputLabel value="euros" />
								</p:panelGrid>
							</h:panelGrid>
							<h:panelGrid columns="8">
								<p:panelGrid columns="2">
									<h:outputText value="Millésime: "
										style="font-weight:bold;float:left;" />
									<p:inputText value="#{mbAccueil.rechercheMillesime }"
										styleClass="rechercheMillesime" />
								</p:panelGrid>
								<p:panelGrid columns="5">
									<h:outputText value="Région: " styleClass="labelRegion" />
									<p:selectOneMenu value="#{mbAccueil.rechercheRegion }"
										styleClass="rechercheRegion">
										<f:selectItem itemLabel="" itemValue="" />
										<f:selectItems value="#{mbAccueil.listeRegion }" />
									</p:selectOneMenu>
								</p:panelGrid>
								<h:panelGrid>
									<p:commandButton value="Rechercher"
										action="#{mbAccueil.rechercheMulticritere}"
										update=":general_growl_form:general_growl"
										styleClass="boutonRechercheMain" />
								</h:panelGrid>
							</h:panelGrid>
						</h:form>
					</fieldset>
				</h:column>




				<h:column id="colonne_droite_header">
					<h:panelGrid columns="1" id="panelPanierAccueil"
						styleClass="panelPanier">
						<h:form>
							<img src="../resources/images/icone-panier.jpg" alt="Panier"  />
							<h:outputText value="Panier : " style="font-weight:bold;" />
							<br />
							<h:outputText value="#{mbPanier.nbrProduitPanier}" />
							<br />
							<h:commandLink value="Voir mon panier"
								action="#{mbAccueil.gestionPanier}">
							</h:commandLink>
						</h:form>
					</h:panelGrid>
				</h:column>
			</h:panelGrid>













			<p:panel id="nav" styleClass="nav">
				<h:form id="bandeauCommande" styleClass="nav_bandeau">
					<p:commandButton id="accueil_button" value="Accueil"
						action="#{mbAccueil.allerAccueil}" styleClass="ui-button-home" />
					<p:commandButton id="vinRouge_button" value="Vins rouges"
						action="#{mbAccueil.rechercheVinRouges}" />
					<p:commandButton id="vinRose_button" value="Vins rosés"
						action="#{mbAccueil.rechercheVinRoses}" />
					<p:commandButton id="vinBlanc_button" value="Vins blancs"
						action="#{mbAccueil.rechercheVinBlancs}" />
					<p:commandButton id="champagne_button" value="Champagnes"
						action="#{mbAccueil.rechercheChampagnes}" />
					<p:commandButton id="spiritueux_button" value="Spiritueux"
						action="#{mbAccueil.rechercheSpiritueux}" />
					<p:commandButton id="accessoires_button" value="Accessoires"
						action="#{mbAccueil.rechercheAccessoires}" />
					<div id="newsletterLink">
					<a href="/VinSurVin/newsletter.jsp" target="_blank" style="color:white;">Abonnez-vous à notre newsletter </a>					
					</div>
				</h:form>
				
				
			</p:panel>

			<h:form id="general_growl_form">
				<p:growl id="general_growl" showDetail="true" showSummary="true" />
			</h:form>

			<p:panel id="main" styleClass="main">
				<ui:insert name="bodyGeneral" id="conteneurPage" />
			</p:panel>

			<p:panel id="footer" styleClass="footer">
				<h:form>
					<h:panelGrid columns="2" columnClasses="fifty, fifty">
						<h:column id="colonne_gauche_footer">
							<h:panelGrid columns="2">
								<h:outputLabel value="Dernière connexion le" rendered="" />
								<h:outputLabel id="footer_connexion_dateHeure_outputText"
									value="" rendered="" />
							</h:panelGrid>
							<h:panelGrid columns="1">
								<h:commandLink value="Conditions générales de vente" />
								<h:commandLink value="Aide en ligne" />
								<h:outputText value="Copyright 2013 Vin sur Vin" />
							</h:panelGrid>
						</h:column>

						<h:column id="colonne_droite_footer">
							<h:panelGrid columns="1">
								<h:panelGrid columns="2">
									<h:outputLabel value="Contact technique : " />
									<h:outputLink value="mailto:contact@vinsurvin.fr">contact@vinsurvin.fr</h:outputLink>
								</h:panelGrid>
								<h:commandLink value="Plan du site" />
								<h:commandLink value="Mentions légales" />
							</h:panelGrid>
						</h:column>
					</h:panelGrid>
				</h:form>
			</p:panel>
		</p:panel>
	</h:body>

</f:view>
</html>